/*
 * @Author: lixiang
 * @Date: 2020-06-22 17:00:40
 * @Description:获取
 */
import store from "@/store/index";
import { uploadFile } from "@/scripts/utils/uploadFile";

/**
 * @description: 年龄设置开始时间和结束时间
 * @param {}
 * @return:
 */

export function getTime() {
  let _date = new Date();
  let _year = _date.getFullYear();
  let _month =
    _date.getMonth() + 1 > 9
      ? _date.getMonth() + 1
      : `0${_date.getMonth() + 1}`;
  let _day = _date.getDate() > 9 ? _date.getDate() : `0${_date.getDate()}`;

  let _startTime = `${_year - 100}-${_month}-${_day}`;
  let _endTime = `${_year}-${_month}-${_day}`;

  return {
    startTime: _startTime,
    _endTime: _endTime
  };
}
/**
 * @description: 日期戳转成日期
 * @param {}
 * @return:
 */

export function dateThransfer(dateStamp) {
  let date = new Date(Number(dateStamp));
  let year = date.getFullYear();
  let month = date.getMonth() + 1;
  let day = date.getDate();
  return `${year}-${month > 9 ? month : "0" + month}-${
    day > 9 ? day : "0" + day
  }`;
}

/**
 * @description: 获取车型文字
 * @param {}
 * @return:
 */

export function getCarTypeText() {
  return new Array("小轿车", "SUV", "7座");
}

/**
 * @description: 获取车牌号类型
 * @param {}
 * @return:
 */

export function getCarNoTypeText() {
  return new Array("普通车型", "新能源");
}
